new Vue({
    el:"#main",
    data:{
        username:"",
        email:"",
        password:""
    },
    methods: {
        register: function () {
            axios.post("http://localhost:8080/register", {
                username: this.username,
                email: this.email,
                password: this.password,
            })
                .then(response => {
                   location.href="login.html";
                })
                .catch(error => { // 添加错误处理
                    console.error("注册请求失败:", error);
                });
        }
    }

})